home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / ee16nt.zip / OEMNADEE.INF < prev    next >
INI File  |  1992-11-13  |  24KB  |  719 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [LanguagesSupported]
  8.     ENG
  9. [Options]
  10.     EE16
  11. [OptionsTextENG]
  12.     EE16     = "Intel EtherExpress-16 LAN Adapter"
  13. [IRQChoices]
  14. IRQ_1 = "2",2
  15. IRQ_2 = "3",3
  16. IRQ_3 = "4",4
  17. IRQ_4 = "5",5
  18. IRQ_5 = "9",9
  19. IRQ_6 = "10",10
  20. IRQ_7 = "11",11
  21. [IOBaseAddrChoices]
  22. IOBase_1  = "0x200",512
  23. IOBase_2  = "0x210",528
  24. IOBase_3  = "0x220",544
  25. IOBase_4  = "0x230",560
  26. IOBase_5  = "0x240",576
  27. IOBase_6  = "0x250",592
  28. IOBase_7  = "0x260",608
  29. IOBase_8  = "0x270",624
  30. IOBase_9  = "0x300",768
  31. IOBase_10  = "0x310",784
  32. IOBase_11  = "0x320",800
  33. IOBase_12  = "0x330",816
  34. IOBase_13  = "0x340",832
  35. IOBase_14  = "0x350",848
  36. IOBase_15  = "0x360",864
  37. IOBase_16  = "0x370",880
  38. [FileConstants]
  39. UtilityInf      = "UTILITY.INF"
  40. subroutineinf   = "SUBROUTN.INF"
  41. SoftwareType    = "driver"
  42. Exit_Code       = 0
  43. DriverToLoad    = ""
  44. NetEventDLL    = "%SystemRoot%\System\netevent.dll"
  45. IoLogMsgDLL    = "%SystemRoot%\System\IoLogMsg.dll"
  46. Manufacturer    = "Microsoft"
  47. ProductMajorVersion    = "3"
  48. ProductMinorVersion    = "1"
  49. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  50. ProductSoftwareName     = "ee16"
  51. ProductSoftwareTitle    = "Intel EtherExpress-16 LAN driver"
  52. ProductSoftwareImagePath = "\SystemRoot\system\drivers\ee16.sys"
  53. NetRuleSoftwareType     = "ee16Sys ndisDriver ee16Driver"
  54. NetRuleSoftwareUse      = $(SoftwareType)
  55. NetRuleSoftwareBindForm = """ee16Sys"" yes no container"
  56. NetRuleSoftwareClass    = {"ee16Driver basic"}
  57. NetRuleSoftwareBindable = {"ee16Driver ee16Adapter non exclusive 100"}
  58. ProductHardwareName     = "ee16"
  59. ProductHardwareEE16Title    = "Intel EtherExpress-16 LAN Adapter"
  60. NetRuleHardwareType     = "ee16 ee16Adapter"
  61. NetRuleHardwareBindForm = " yes yes container"
  62. NetRuleHardwareClass    = {"ee16Adapter basic"}
  63. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  64. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  65. [GeneralConstants]
  66. from      = ""
  67. to        = ""
  68. ExitCodeOk     = 0
  69. ExitCodeCancel = 1
  70. ExitCodeFatal  = 2
  71. KeyNull         = ""
  72. MAXIMUM_ALLOWED   = 33554432
  73. RegistryErrorIndex = NO_ERROR
  74. KeyProduct      = ""
  75. KeyParameters   = ""
  76. TRUE            = 1
  77. FALSE           = 0
  78. NoTitle            = 0
  79. ExitState   = "Active"
  80. OldVersionExisted = $(FALSE)
  81. DriverPath      = $(!STF_NTPATH)\drivers
  82. [TransceiverChoicesENG]
  83. Trans_1 = "External", 1
  84. Trans_2 = "Internal",  2
  85. [FileConstantsENG]
  86. ProCaption   = "Windows NT Setup"
  87. ProCancel    = "Cance&l"
  88. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  89.                "Are you sure you want to cancel copying files?"
  90. ProCancelCap = "Network Setup Message"
  91. ProText1     = "Copying:"
  92. ProText2     = "To:"
  93. FunctionTitle   = "Intel EtherExpress-16 LAN Adapter Setup"
  94. ProductSoftwareDescription      = "Intel EtherExpress-16 LAN Driver"
  95. ProductHardwareEE16Description    = "Intel EtherExpress-16 LAN Adapter"
  96. IRQList  = ^(IRQChoices, 1)
  97. IRQValues = ^(IRQChoices, 2)
  98. IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  99. IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  100. [DialogConstantsENG]
  101. Help        = "&Help"
  102. Exit        = "&Cancel"
  103. OK          = "&OK"
  104. HelpContext = ""
  105. Continue    = "C&ontinue"
  106. Cancel      = "C&ancel"
  107. [date]
  108.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  109. [FileDependentDlgENG]
  110. DlgType = "MultiCombo"
  111. DlgTemplate = "WD"
  112. Caption = $(FunctionTitle)
  113. DlgText = "Please select values for the follwing fields:"
  114. Combo1Label = "&IRQ Level:"
  115. Combo2Label = "I/O &Port Base Addr:"
  116. Combo1List = $(IRQList)
  117. Combo1Out  = $(IRQValue)
  118. Combo2List = $(IOBaseAddrList)
  119. Combo2Out  = $(IOBaseAddrValue)
  120. ComboListItemsIn  = {Combo1List, Combo2List}
  121. ComboListItemsOut = {Combo1Out, Combo2Out}
  122. EditTextIn = ""
  123. EditTextLim = ""
  124. CBOptionsGreyed = {}
  125. NotifyFields = {NO, NO}
  126. HelpContext = $(!IDH_DB_OEMNADE2_INS)
  127. [Identify]
  128.     read-syms Identification
  129.     set Status     = STATUS_SUCCESSFUL
  130.     set Identifier = $(OptionType)
  131.     set Media      = #("Source Media Descriptions", 1, 1)
  132.     Return $(Status) $(Identifier) $(Media)
  133. [ReturnOptions]
  134.     set Status        = STATUS_FAILED
  135.     set OptionList     = {}
  136.     set OptionTextList = {}
  137.     set LanguageList = ^(LanguagesSupported, 1)
  138.     Ifcontains(i) $($0) in $(LanguageList)
  139.         ifstr(i) $($1) == ""
  140.             goto returnoptions
  141.         endif
  142.         set PlatformList = ^(PlatformsSupported, 1)
  143.         Ifcontains(i) $($1) in $(PlatformList)
  144.             goto returnoptions
  145.         else
  146.             set Status = STATUS_NOTSUPPORTED
  147.             goto finish_ReturnOptions
  148.         endif
  149.     else
  150.         set Status = STATUS_NOLANGUAGE
  151.         goto finish_ReturnOptions
  152.     endif
  153. returnoptions = +
  154.     set OptionList     = ^(Options, 1)
  155.     set OptionTextList = ^(OptionsText$($0), 1)
  156.     set Status         = STATUS_SUCCESSFUL
  157. finish_ReturnOptions = +
  158.     Return $(Status) $(OptionList) $(OptionTextList)
  159. [InstallOption]
  160.     set Status   = STATUS_FAILED
  161.     set Option   = $($1)
  162.     set !SrcDir   = $($2)
  163.     set !AddCopy  = $($3)
  164.     set !DoCopy   = $($4)
  165.     set !DoConfig = $($5)
  166.     set LanguageList = ^(LanguagesSupported, 1)
  167.     Ifcontains(i) $($0) in $(LanguageList)
  168.         goto installoption
  169.     else
  170.         set Status = STATUS_NOLANGUAGE
  171.         goto finish_InstallOption
  172.     endif
  173. installoption = +
  174.     set !NTN_InstallMode  = "install"
  175.     ifstr(i) $(!NTN_Origination) != "NCPA"
  176.         set !NTN_Origination = "install"
  177.     endif
  178.     shell "" CommonSection $(Option)
  179.     set Status = $($R0)
  180.     ifstr(i) $($R1) != ""
  181.         set DriverToLoad = { $($R1) }
  182.     else
  183.         set DriverToLoad = ""
  184.     endif
  185.     Return $(Status) $(DriverToLoad)
  186. [NcpaInvocation]
  187.     set Option   = $(!NTN_InfOption)
  188.     set !SrcDir   = $(!STF_SRCDIR)
  189.     Ifstr(i) $(!NTN_InstallMode) == install
  190.         set !AddCopy  = YES
  191.         set !DoCopy   = YES
  192.         set !DoConfig = YES
  193.     Else
  194.         set !AddCopy  = NO
  195.         set !DoCopy   = NO
  196.         set !DoConfig = NO
  197.     Endif
  198.     shell "" CommonSection $(Option)
  199.     set Status = $($R0)
  200.     Return $(Status)
  201. [CommonSection]
  202.     StartWait
  203.     set Option = $($0)
  204.     Debug-Output "OEMNADE2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  205.     Debug-Output "OEMNADE2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  206.     set-subst LF = "\n"
  207.     read-syms GeneralConstants
  208.     read-syms FileConstants
  209.     read-syms DialogConstants$(!STF_LANGUAGE)
  210.     read-syms FileConstants$(!STF_LANGUAGE)
  211.     detect date
  212.     set-title  $(FunctionTitle)
  213.     set to   = Begin
  214.     set from = Begin
  215.     set CommonStatus = STATUS_SUCCESSFUL
  216.     EndWait
  217. Begin = +
  218.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  219.         set StartLabel = removeadapter
  220.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  221.         set StartLabel = UpgradeSoftware
  222.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  223.         set StartLabel = bindingadapter
  224.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  225.         set StartLabel = configureadapter
  226.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  227.             Debug-Output "Cannot configure the Elink II driver software."
  228.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  229.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  230.                 Debug-Output "ShellCode error: cannot get an error string."
  231.                 goto ShellCodeError
  232.             endif
  233.             set Error = $($R0)
  234.             set from = end
  235.             set to = end
  236.             goto Warning
  237.         endif
  238.     else
  239.         set StartLabel = installadapter
  240.         set OEM_ABANDON_OPTIONS = {}
  241.         set OEM_ABANDON_SOFTWARE = FALSE
  242.         set OEM_ABANDON_ON = TRUE
  243.     endif
  244.     set IRQValue = *($(IRQList), 4)
  245.     set IOBaseAddrValue = *($(IOBaseAddrList), 9)
  246.     set from = $(fatal)
  247.     set to = $(fatal)
  248.     goto $(StartLabel)
  249. installadapter = +
  250.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  251.     Ifstr $(KeyProduct) != $(KeyNull)
  252.     CloseRegKey $(KeyProduct)
  253.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  254.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  255.            $(ProductVersion)
  256.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  257.            Debug-Output "ShellCode error: cannot get an error string."
  258.            goto ShellCodeError
  259.        endif
  260.        goto end
  261.     else
  262.        Shell $(UtilityInf), CardExistedDlg
  263.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  264.            Debug-Output "ShellCode error: cannot get an error string."
  265.            goto ShellCodeError
  266.        endif
  267.        ifstr(i) $($R1) != "OK"
  268.            goto end
  269.        endif
  270.        set OldVersionExisted = $(TRUE)
  271.     endif
  272.     endif
  273.     goto adapteroptions
  274. configureadapter = +
  275.     Ifstr $(KeyProduct) == $(KeyNull)
  276.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  277.         Ifstr $(KeyProduct) == $(KeyNull)
  278.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  279.             Debug-Output "Cannot find component product key"
  280.             goto fatalregistry
  281.         Endif
  282.     Endif
  283.     Debug-Output "INF: Shelling to FindService"
  284.     Shell $(UtilityInf) FindService, $(KeyProduct)
  285.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  286.         Debug-Output "INF: FindService shell failure"
  287.         Goto ShellCodeError
  288.     Endif
  289.     Ifstr(i) $($R0) != NO_ERROR
  290.         Debug-Output "INF: FindService Shell error: "$($R0)
  291.         Goto fatalregistry
  292.     endif
  293.     set KeyParameters = $($R2)
  294.     CloseRegKey $($R1)
  295.     Ifstr $(KeyParameters) == $(KeyNull)
  296.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  297.         Debug-Output "Cannot find component service"
  298.         goto fatalregistry
  299.     endif
  300.     set OldVersionExisted = $(TRUE)
  301.     set ValueName = ""
  302.     set ValueData = ""
  303.     set ValueStr  = ""
  304.     set ValueList = {}
  305.     EnumRegValue $(KeyParameters) ValueList
  306.     ForListDo $(ValueList)
  307.     set ValueItem = $($)
  308.     set ValueName = *($(ValueItem),1)
  309.     set ValueData = *($(ValueItem),4)
  310.     ifstr(i) $(ValueName) == "InterruptNumber"
  311.         set IRQValueIndex = $(ValueData)
  312.     else-ifstr(i) $(ValueName) == "IoBaseAddress"
  313.         set IOBaseAddrIndex = $(ValueData)
  314.     endif
  315.     EndForListDo
  316.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  317.     ifstr(i) $(IRQValue) == ""
  318.     set IRQValue = *($(IRQList), 4)
  319.     endif
  320.     set IOBaseAddrValue = *($(IOBaseAddrList), +
  321.      ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  322.     ifstr(i) $(IOBaseAddrValue) == ""
  323.     set IOBaseAddrValue = *($(IOBaseAddrList), 9)
  324.     endif
  325.     goto adapteroptions
  326. adapteroptions = +
  327.     set from = adapteroptions
  328.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  329.     set CheckItemsIn = {*($(MappedValues),~($(MappedList),$(MemoryMappedIndex)))}
  330.     ui start "InputDlg"
  331.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  332.         set IRQValueIndex = $(Combo1Out)
  333.         set IOBaseAddrIndex = $(Combo2Out)
  334.         ui pop 1
  335.         goto nextstep
  336.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  337.         set CommonStatus = STATUS_USERCANCEL
  338.         Debug-Output "Action: exit. Bye."
  339.         ui pop 1
  340.         goto end
  341.     else
  342.         ui pop 1
  343.         Debug-Output "Action: unknown. Bye."
  344.         goto end
  345.     endif
  346. nextstep = +
  347.     ifint $(OldVersionExisted) == $(TRUE)
  348.     ifstr(i) $(!NTN_InstallMode) == configure
  349.         goto writeparameters
  350.     endif
  351.     endif
  352.     StartWait
  353. installproduct = +
  354.     ifint $(OldVersionExisted) == $(FALSE)
  355.         ifstr(i) $(!NTN_Origination) == "NCPA"
  356.         Ifstr(i) $(!DoCopy) == "YES"
  357.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR)
  358.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.            Goto fatal
  360.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  361.            Goto fatal
  362.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  363.            Goto installstep1
  364.            Endif
  365.            Set !STF_SRCDIR = $($R1)
  366.         Endif
  367.         install "Install-Option"
  368.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  369.            goto fatal
  370.         endif
  371.         endif
  372.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  373.         $(ProductSoftwareName), +
  374.         $(ProductSoftwareName), $(STF_CONTEXTINFNAME), +
  375.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  376.         $(NetEventDLL)
  377.     Set OEM_ABANDON_SOFTWARE = TRUE
  378.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  379.         Debug-Output "ShellCode error"
  380.         goto ShellCodeError
  381.     endif
  382.     set RegistryErrorIndex = $($R0)
  383.     set KeyProduct      = $($R1)
  384.     Set SoftNetRulesKey = $($R2)
  385.     CloseRegKey $($R3)
  386.     CloseRegKey $($R4)
  387.     CloseRegKey $($R5)
  388.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  389.         EndWait
  390.         Debug-Output "Registry error: add software components"
  391.         CloseRegKey $(KeyProduct)
  392.         CloseRegKey $(SoftNetRulesKey)
  393.         goto fatalregistry
  394.     endif
  395.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  396.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  397.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  398.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  399.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  400.                {PathName,$(NoTitle),$(!REG_VT_SZ),$(!STF_CWDDIR)},+
  401.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  402.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  403.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  404.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  405.         Debug-Output "ShellCode error."
  406.         goto ShellCodeError
  407.     endif
  408.     set RegistryErrorIndex = $($R0)
  409.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  410.         EndWait
  411.         Debug-Output "Registry error: add value list."
  412.         CloseRegKey $(KeyProduct)
  413.         CloseRegKey $(SoftNetRulesKey)
  414.         goto fatalregistry
  415.     endif
  416.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  417.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  418.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  419.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  420.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  421.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  422.                 {Infname ,$(NoTitle),$(!REG_VT_SZ),$(STF_CONTEXTINFNAME)} }
  423.     Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  424.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  425.         Debug-Output "ShellCode error."
  426.         goto ShellCodeError
  427.     endif
  428.     set RegistryErrorIndex = $($R0)
  429.     CloseRegKey $(KeyProduct)
  430.     CloseRegKey $(SoftNetRulesKey)
  431.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  432.         EndWait
  433.         Debug-Output "Resgitry error: add value list."
  434.         goto fatalregistry
  435.     endif
  436.     endif
  437.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  438.     ifint $($R4) != -1
  439.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  440.     endif
  441.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  442.     Debug-Output "Cannot add hardware component"
  443.     goto ShellCodeError
  444.     endif
  445.     set RegistryErrorIndex = $($R0)
  446.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  447.     EndWait
  448.     Debug-Output "Registry error: add hardware component"
  449.     CloseRegKey $($R1)
  450.     CloseRegKey $($R2)
  451.     CloseRegKey $($R3)
  452.     goto fatalregistry
  453.     endif
  454.     set KeyParameters = $($R3)
  455.     set KeyAdapterRules = $($R2)
  456.     set AdapterNumber = $($R4)
  457.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  458.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  459.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  460.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  461.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  462.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  463.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  464.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  465.     Debug-Output "ShellCode error"
  466.     goto ShellCodeError
  467.     endif
  468.     CloseRegKey $($R1)
  469.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  470.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  471.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  472.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  473.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  474.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  475.             {Infname ,$(NoTitle),$(!REG_VT_SZ),$(STF_CONTEXTINFNAME)}}
  476.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  477.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  478.     Debug-Output "ShellCode error."
  479.     goto ShellCodeError
  480.     endif
  481.     set RegistryErrorIndex = $($R0)
  482.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  483.     EndWait
  484.     Debug-Output "Resgitry error: add value list."
  485.     CloseRegKey $(KeyParameters)
  486.     CloseRegKey $(KeyAdapterRules)
  487.     goto fatalregistry
  488.     endif
  489.     CloseRegKey $(KeyAdapterRules)
  490.     goto writeparameters
  491. writeparameters = +
  492.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  493.     set IOBaseAddrValue = *($(IOBaseAddrValues), +
  494.      ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  495.     set NewValueList = {{MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  496.                {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  497.                {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  498.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  499.     CloseRegKey $(KeyParameters)
  500.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  501.     Debug-Output "ShellCode error."
  502.     goto ShellCodeError
  503.     endif
  504.     set RegistryErrorIndex = $($R0)
  505.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  506.     Debug-Output "Registry error: Add value list"
  507.     goto fatalregistry
  508.     endif
  509.     EndWait
  510.     Set DriverToLoad = $(ProductSoftwareName)
  511.     goto successful
  512. bindingadapter =+
  513.     set Error = "Binding: Sorry, not yet implemented."
  514.     goto fatal
  515. removeadapter = +
  516.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  517.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  518.             $(ProductSoftwareName)
  519.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  520.             Debug-Output "ShellCode error"
  521.             goto ShellCodeError
  522.     endif
  523.     set RegistryErrorIndex = $($R0)
  524.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  525.             goto fatalregistry
  526.     endif
  527.     else
  528.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  529.         $(ProductSoftwareName), $(!NTN_RegBase)     
  530.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  531.             Debug-Output "ShellCode error"
  532.             goto ShellCodeError
  533.     endif
  534.     set RegistryErrorIndex = $($R0)
  535.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  536.             goto fatalregistry
  537.     endif
  538.     endif
  539.     goto end
  540. UpgradeSoftware = +
  541.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  542.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  543.         Ifstr $(KeyProduct) != $(KeyNull)
  544.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  545.         set Version = *($(VersionInfo), 4)
  546.         Split-String $(!NTN_Infname), "\", FilenameList
  547.         QueryListSize ListSize $(FilenameList)
  548.         set !UG_Filename = *($(FilenameList), $(ListSize))
  549.              install "Install-Update"
  550.              ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  551.                  goto fatal
  552.              endif
  553.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  554.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  555.         ifint $(Version) != $(ProductVersion)
  556.         endif
  557.         CloseRegKey $(KeyProduct)
  558.         else
  559.         goto fatalregistry
  560.         endif
  561.     else
  562.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) + 
  563.             $(MAXIMUM_ALLOWED) NetworkCardKey
  564.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  565.         GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  566.         set ServiceName = *($(ServiceNameInfo), 4)                                  
  567.         OpenRegKey $(NetworkCardKey) "" "NetRules" + 
  568.             $(MAXIMUM_ALLOWED) NetRuleKey
  569.         Ifstr(i) $(NetRuleKey) != $(KeyNull)
  570.         else
  571.         goto fatalregistry
  572.         endif
  573.         CloseRegKey $(NetRules)
  574.         CloseRegKey $(NetworkCardKey)
  575.         else
  576.         goto fatalregistry
  577.         endif
  578.         OpenRegKey $(!REG_H_LOCAL) "" + 
  579.             $(!NTN_ServiceBase)"\"$(ServiceName) + 
  580.             $(MAXIMUM_ALLOWED) ServiceKey
  581.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  582.         CloseRegKey $(ServiceKey)
  583.         else
  584.         goto fatalregistry
  585.     endif
  586.     endif                                                                       
  587.     goto end                                                                    
  588. successful = +
  589.      Debug-Output "OEMNADE2.INF: Successful; installing [InstallOption], DoCopy = "$(!DoCopy)
  590.     ifstr(i) $(!NTN_Origination) == "install"
  591.         Ifstr(i) $(!DoCopy) == "YES"
  592.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR)
  593.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  594.               Goto fatal
  595.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  596.               Goto fatal
  597.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  598.               Goto installstep1
  599.           Endif
  600.           Set !STF_SRCDIR = $($R1)
  601.         Endif
  602.         install "Install-Option"
  603.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  604.           goto fatal
  605.         endif
  606.     endif
  607.     goto installstep1
  608. installstep1 = +
  609.     goto end
  610. abandon = +
  611.     ForListDo $(OEM_ABANDON_OPTIONS)
  612.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  613.         $(ProductSoftwareName), $($)     
  614.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  615.             Debug-Output "ShellCode error"
  616.             goto ShellCodeError
  617.     endif
  618.     set RegistryErrorIndex = $($R0)
  619.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  620.             goto fatalregistry
  621.     endif
  622.     EndForListDo
  623.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  624.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  625.             $(ProductSoftwareName), FALSE
  626.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  627.             Debug-Output "ShellCode error"
  628.             goto ShellCodeError
  629.     endif
  630.     set RegistryErrorIndex = $($R0)
  631.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  632.             goto fatalregistry
  633.     endif
  634.     endif
  635.     goto end
  636. warning = +
  637.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  638.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  639.     goto ShellCodeError
  640.     endif
  641.     ifstr(i) $($R1) == "OK"
  642.     goto $(to)
  643.     else-ifstr(i) $($R1) == "CANCEL"
  644.     goto $(from)
  645.     else
  646.     goto "end"
  647.     endif
  648. nonfatal = +
  649.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  650.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  651.     goto ShellCodeError
  652.     endif
  653.     ifstr(i) $($R1) == "OK"
  654.     goto $(from)
  655.     else
  656.     goto "end"
  657.     endif
  658. fatalregistry = +
  659.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  660.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  661.     goto ShellCodeError
  662.     endif
  663.     set Error = $($R0)
  664.     goto fatal
  665. fatal = +
  666.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  667.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  668.     goto ShellCodeError
  669.     endif
  670.     goto setfailed
  671. ShellCodeError = +
  672.     set DlgType      = "MessageBox"
  673.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  674.     set STF_MB_TEXT  = "Shell Code Error"
  675.     set STF_MB_TYPE  = 1
  676.     set STF_MB_ICON  = 3
  677.     set STF_MB_DEF   = 1
  678.     ui start "Error Message"
  679.     goto setfailed
  680. setfailed = +
  681.     set CommonStatus = STATUS_FAILED
  682.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  683.         set OEM_ABANDON_ON = FALSE
  684.     goto abandon
  685.     endif
  686.     goto end
  687. end = +
  688.     goto term
  689. term = +
  690.     Return $(CommonStatus) $(DriverToLoad)
  691. [Install-Option]
  692.     set STF_VITAL = ""
  693.     ifstr(i) $(!AddCopy) == "YES"
  694.     AddSectionFilesToCopyList Files-$(Option) $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)\drivers
  695.     endif
  696.     ifstr(i) $(!DoCopy) == "YES"
  697.        CopyFilesInCopyList
  698.     endif
  699.     ifstr(i) $(!DoConfig) == "YES"
  700.     endif
  701.     Exit
  702. [Install-Update]
  703.    set STF_VITAL     = ""
  704.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  705.    AddSectionFilesToCopyList Files-$(Option) $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)\drivers
  706.    AddSectionFilesToCopyList Files-Inf $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)
  707.    CopyFilesInCopyList
  708.    exit
  709. [Source Media Descriptions]
  710.     1  = "Windows NT Setup Disk #1"  , TAGFILE = disk1
  711.     2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  712. [ProductType]
  713. STF_PRODUCT  = Winnt
  714. STF_PLATFORM = I386
  715. [Files-Inf]
  716. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  717. [Files-ee16]
  718. 2,ee16.sys , SIZE=39424
  719.